<html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" >  

    <!--    <h:body>-->
    <ui:composition template="layout.xhtml">
        <ui:define name="corpo">
            <h:form id="index_form" acceptcharset="utf-8"> 
                <div id="breadcrumb">
                    <p:commandLink  actionListener="#{managerIndex.redirect('index.xhtml')}" value="Inicio" update="@form" immediate="true"/> >
                    <p:commandLink  actionListener="#{managerIndex.redirect('config.xhtml')}" value="Configurações" update="@form" immediate="true"/> >
                    <p:commandLink  value="Cor do Selo" update="@form" immediate="true"/>
                </div>
                <p:panel header="Principal - Cor Selo">

                    <br/>
                    <h:panelGrid style="float: right;" columns="4">
                        <p:graphicImage url="/media/img/new.png" title="Cadastrar Cor Selo" /> <p:commandLink   value="Cadastrar" title="Cadastrar Cor Selo" actionListener="#{managerCorSelo.redirect('criarCorSelo.xhtml')}" update="@form"/>
                        <!--                        <p:graphicImage url="/media/img/search.png" title="Pesquisar Cor Selo"/><p:commandLink value="Pesquisar" title="Pesquisar Cor Selo" actionListener="{managerCorSelo.pesquisarCorSelo()}" update="@form"/>-->
                    </h:panelGrid>
                    <br/>
                    <br/>
                    <h:panelGrid columns="2" width="970" styleClass="textAlignRight" columnClasses="textAlignRight"> 
                        <p:dataTable id="corTable" var="cors" value="#{managerVisaoCorSelo.todos()}" 
                                     paginator="true" rows="5"
                                     paginatorPosition="bottom"
                                     paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"  
                                     rowsPerPageTemplate="5,10,15">    

                            <f:facet name="header">  
                                Cor Selos
                            </f:facet>
                            <p:column style="width:50px; background-color: \##{cors.cor};">  
                                <f:facet name="header" >   
                                    Cor
                                </f:facet>  
                            </p:column>     
                            <p:column  >  
                                <f:facet name="header" >   
                                    Descrição
                                </f:facet>  
                                <h:outputText value="#{cors.descricao}"   />  
                            </p:column>
                            <p:column style="width:40px;">  
                                <f:facet name="header">  
                                    <h:outputText value="Opções" />   
                                </f:facet>
                                <p:commandButton  icon="editar" label="Editar Selo"  actionListener="#{managerEditarCorSelo.redirect('editarCorSelo.xhtml',cors)}" update="@form"/>  

                            </p:column>

                        </p:dataTable> 
                    </h:panelGrid>

                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>
</html>
